<template>
  <div class="vt-cart-header flx">
    <div class="cart-header-check" @click="toggleAll">
      <Checkbox v-model="isCheckAll" />
    </div>
    <div class="cart-header-content">
      <slot></slot>
    </div>
  </div>
</template>

<script>
  import Checkbox from 'assets/myTools/vueTools/com/common/checkbox2/checkbox/checkbox'
  export default {
    name: 'cart-header',
    components: {
      Checkbox
    },
    inject: ['test'],
    data() {
      return {
		comName: '<CartHeader>',
        isCheckAll: false
      }
    },
    methods: {
      checkAllTogger(x){
        this.isCheckAll = x
      },
      toggleAll(){
        this.$parent.$emit('click-toggle-all')
      }
    }
  }
</script>

<style scoped lang="stylus">
@import "./index.styl"
</style>
